<?php if (!defined('THINK_PATH')) exit();?><!doctype html>
<html>
<head>
<meta charset="utf-8">
<title>首页</title>
<script src="/project/bugweb/Public/Js/jquery-1.8.2.min.js"></script>
<script src="/project/bugweb/Public/Js/jquery-ui.min.js"></script>
<style type="text/css">
html{ overflow: scroll; }body{font-family:'微软雅黑'; background-color:#EEE;}ul{list-style:none; margin:0; padding:0;}

.headerA{width:1200px; background-color:#09C; color:#FFF; border-radius:5px 5px 0 0; padding-top:20px; padding-bottom:0;}
.tableA{ width:100%;}
.tableA td{text-align:center}

.div_user{width:100%; height:70px; font-size:14px; color:#FFC;}
.div_user img{width:50px; height:50px; border-radius:3px; float:right; margin-right:30px;}
.div_user ul{float:right; padding-right:10px; padding-top:20px;}
.div_user li{float:right; padding:0 5px; cursor:pointer;}

.func_module ul{margin-right:50px;}
.func_module li{
	float:right; padding:4px 35px; font-size:14px; border:#FFF 1px solid; 
	background-color:#369; color:#FFF; margin:0 5px; cursor:pointer; border:#369 1px solid; border-bottom:0;
}

.tableB{width:1200px; padding:40px 40px 15px 40px; background-color:#FFF; color:#666; font-size:14px;}
.typelist ul{width:100%;}
.typelist li{
	float:left; width:90px; text-align:center; padding:4px 0; font-size:14px;
	border:#069 1px solid; background-color:#FFF; color:#069; margin:0 5px; cursor:pointer; letter-spacing:1px;
}

.contentA{width:1200px; background-color:#FFF; border-radius:0 0 5px 5px; padding-bottom:20px;}
.tableC {width:1200px; padding:40px 45px; background-color:#FFF; color:#369; font-size:14px;}
.tableC th{background-color:#EEE; height:40px; font-weight:bold; text-align:left; color:#555; padding-left:20px; letter-spacing:0px;}
.tableC td{border-bottom:#6CC 0px dashed; padding:8px 0 8px 20px; color:#777; vertical-align:top;}
.tableC .td_npg, .tableC .td_pg{border:0;}
.tableC .td_npg button{
	width:98%; height:33px;background-color:rgba(153,204,255,0.3); 
	border:#9CF 1px solid; border-radius:3px; margin:3px; cursor:pointer
}
.tableC .td_npg button:hover{color:#F96;}
.tableC .td_pg ul{float:right; margin-right:15px; margin-top:20px}
.tableC .td_pg li{float:left; padding:3px 9px;margin-right:7px; border:#369 1px solid;}
.tableC .td_pg li:hover{border-color:#F96;}
.tableC .nowPage{background-color:#9CF; color:#63C;}
.tableC a{text-decoration:none; color:#369}
.tableC a:hover{ text-decoration:underline;}

.textA{width:500px; margin:0; padding:0 5px; height:25px; border:#999 1px solid;}
.textA:focus{border-color:#F93; outline:none;}
.textB{width:150px; margin:0; padding:0 5px; height:25px; border:#999 1px solid;}
.textB:focus{border-color:#F93; outline:none;}
.textC{width:250px; margin:0; padding:0 5px; height:25px; border:#999 1px solid;}
.textC:focus{border-color:#F93; outline:none;}
.textD{width:90px; margin:0; padding:0 5px; height:25px; border:#999 1px solid;}
.textD:focus{border-color:#F93; outline:none;}

.selectA{width:100px; height:25px; margin:0; padding:0; border:#999 1px solid; cursor:pointer}
.selectA:focus{border-color:#F93; outline:none;}

.buttonA{width:90px; height:30px; border:#63F 0px solid; background-color:#369; color:#FFF; cursor:pointer; border-radius:2px}

.div_user a{color:#FFF; text-decoration:none;}
.div_user a:hover{color:#0FF;}
textarea{height:400px;}
red{color:#F33;} black{color:#000;} purple{color:#93C;} orange{color:#F90;} blue{color:#06F}
</style>

<style type="text/css">
</style>

</head>

<body><center>
<div class="headerA">
	<table class="tableA" align="center" border="0" cellpadding="0" cellspacing="0">
    	<tr>
        	<td><div class="div_logo">Logo</div></td>
            <td><div class="div_user">
            		<img src="/project/bugweb/Public/Image/faceimg.jpg" align='absmiddle'>
                    <ul>
                    	<a href="../User/toLogout"><li>退出</li></a>
                        <a href="../User/reInfo"><li>设置</li></a>
                       	<?php if(($_SESSION['bw_AdminUser']== 1)): ?><a href="../Admin/index"><li>后台</li></a><?php endif; ?>
                        <a href="../Bug/ownerBug">
                        	<li>提醒<?php if(($_SESSION['bw_OwnerBug']== 0)): else: ?><red> (<?php echo (session('bw_OwnerBug')); ?>)</red><?php endif; ?></li>
                            </a>
                        <b><li><?php echo ($_SESSION['bw_user']['nickname']); ?></li></b>
                    </ul>
            	</div></td>
        </tr>
        <tr>
        	<td colspan="2">
            	<div class="func_module">
                	<ul>
                    	<a href="../Bug/selectBug"><li class="lia_ss">搜索</li></a>
                        <a href="../Bug/addBug"><li class="lia_tj">添加</li></a>
                        <a href="../Bug/getBuglist"><li class="lia_zl">总览</li></a>
                    </ul>
                </div>
            </td>
        </tr>
    </table>
</div>

<div class="contentA">
	
<form action="addBug" enctype="multipart/form-data" method="post" id="form_addBug" >
<div id="uploadContainer" style="display:none;">
	<div id="queue"></div>
	<input id="file_upload" name="file_upload" type="file" multiple>
</div>
<table class="tableC" align="center" border="0" cellpadding="0" cellspacing="0">
    	<tr><th colspan="2">添加Bug</th></tr>
    	<tr><td width="60px"><label>简介</label></td><td><input type="text" id="bug_title" value="<?php echo ($bugInfo["bug_title"]); ?>" name="bug_title" class="textA"></td></tr>
        <tr>
            <td><label>版本</label></td>
            <td>
            	<input type="text" name="version" class="textD">
            </td></tr>
        <tr>
            <td><label>模块</label></td>
            <td>
            	<select name="module" class="selectA">
            		<?php if(is_array(C("BUG_MODULE"))): foreach(C("BUG_MODULE") as $key=>$module): ?><option value="<?php echo ($key); ?>"><?php echo ($module); ?></option><?php endforeach; endif; ?>
            	</select>
            </td></tr>
       <tr>
            <td><label>平台</label></td>
            <td>
            	<select name="platform" class="selectA">
            		<?php if(is_array(C("BUG_PLATFORM"))): foreach(C("BUG_PLATFORM") as $key=>$pt): ?><option value="<?php echo ($key); ?>"><?php echo ($pt); ?></option><?php endforeach; endif; ?>
            	</select>
            </td></tr>
       <tr>
       		<td><label>级别</label></td>
       		<td><select name="level" class="selectA">
       				<?php if(is_array(C("BUG_LEVEL"))): foreach(C("BUG_LEVEL") as $key=>$level): ?><option value="<?php echo ($key); ?>"><?php echo ($level); ?></option><?php endforeach; endif; ?>
       		</select>
       <tr><td valign="top"><label>详细</label></td><td><textarea id="textArea" name="bug_content" class="textareaA"></textarea></td></tr>
       <tr><td></td><td><input type="button" value="确定" id='add_submit' class="buttonA"></td></tr>
    </table>
    <input type="file" name="upFile" id="upFile" style="display:none;">
</form>

</div>
</center></body>

<link href="/project/bugweb/Public/WangEditor/css/wangEditor-1.3.12.css" rel="stylesheet" type="text/css">
<link rel="stylesheet" type="text/css" href="/project/bugweb/Public/Uploadify/uploadify.css">
<script src="/project/bugweb/Public/WangEditor/js/wangEditor-1.3.12.min.js"></script>
<script src="/project/bugweb/Public/Uploadify/jquery.uploadify.min.js" type="text/javascript"></script>
<script language="javascript">
$(".lia_tj").css("background-color","#FFF").css("color","#369");

$("#add_submit").click(function(){
	var bugTitle = $("#bug_title").val();
	if(bugTitle == ""){
		alert("请输入标题!");
	}else{
		$("#form_addBug").submit();
	}
});

var editor = $('#textArea').wangEditor({
    uploadImgComponent:$('#uploadContainer')
});

$('#file_upload').uploadify({
	'swf'      : '/project/bugweb/Public/Uploadify/uploadify.swf',
	'uploader' : '<?php echo U("Index/upLoadFile");?>',   //上传的方法
	'buttonText' : '浏览图片',
	'onUploadSuccess' : function(file, data, response) {
		var imgSrc	= '/project/bugweb/Public/Image/Bug/'+data;
		editor.html(editor.html()+"<br><img width='200' src="+imgSrc+"><br>");
	}
});

</script>

<script language="javascript">
var minHeight	= $(window).height()-160+'px';
$(".contentA").css("min-height",minHeight);

$(".func_module li").mouseover(function(){
	if($(this).attr("class") != "<?php echo ($activeLi); ?>")
		$(this).animate({backgroundColor:"#FFF",color:"#369"},300);
}).mouseout(function(){
	if($(this).attr("class") != "<?php echo ($activeLi); ?>")
		$(this).animate({backgroundColor:"#369",color:"#FFF"},300);
});

$(".buttonA").mouseover(function(){
	$(this).animate({backgroundColor:"#09C"},300);
}).mouseout(function(){
	$(this).animate({backgroundColor:"#369"},300);
});
</script>
</html>